package com.gdk.service.impl;

import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.IntStream;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.gdk.dao.ArticleDao;
import com.gdk.dao.HotelDao;
import com.gdk.dao.LoginDao;
import com.gdk.service.ArticleService;
import com.gdk.service.HotelService;
import com.gdk.service.LoginService;
import com.gdk.utils.Md5Utils;


/**
 * 酒店业务处理
 * */
@Service("HotelService")
public class HotelServiceImpl implements HotelService {
	@Autowired
    private HotelDao hotelDao;
	
	@Override
	public int addHotelRoom(Map<String, Object> map) {
		return hotelDao.addHotelRoom(map);
	}
	@Override
	public List<Map<String, Object>> selectAllHotelRoom(Map<String, Object> map) {
		return hotelDao.selectAllHotelRoom(map);
	}
	@Override
	public Map<String, Object> selectHotelRoomDetails(Map<String, Object> map) {
		return hotelDao.selectHotelRoomDetails(map);
	}
	@Override
	public int updateHotelRoomDetails(Map<String, Object> map) {
		System.out.println("房间map  "+map);
		return hotelDao.updateHotelRoomDetails(map);
	}
	
	@Override
	public int addHotelBed(Map<String, Object> map) {
		return hotelDao.addHotelBed(map);
	}
	@Override
	public List<Map<String, Object>> selectAllHotelBed(Map<String, Object> map) {
		return hotelDao.selectAllHotelBed(map);
	}
	
	@Override
	public List<Map<String, Object>> selectUserBindHotel(Map<String, Object> map) {
		return hotelDao.selectUserBindHotel(map);
	}
	
	
	@Override
	public int updateHotelBedDetails(Map<String, Object> map) {
		System.out.println("map  : "+map);
		return hotelDao.updateHotelBedDetails(map);
	}
	
	@Override
	public int delBind(Map<String, Object> map) {
		return hotelDao.delBind(map);
	}
	@Override
	public List<Map<String, Object>> selectBedBindUserByBed(Map<String, Object> map) {
		return hotelDao.selectBedBindUserByBed(map);
	}
	@Override
	public List<Map<String, Object>> selectAllBedBindUser(Map<String, Object> map) {
		return hotelDao.selectAllBedBindUser(map);
	}
	
	@Override
	public int truncateBind(Map<String, Object> map) {
		return hotelDao.truncateBind(map);
	}
	
	@Override
	public List<Map<String, Object>> selectAllBedBySexAndTypeAndStatus(Map<String, Object> map) {
		return hotelDao.selectAllBedBySexAndTypeAndStatus(map);
	}
	
	
	@Override
	public int addHotel(Map<String, Object> map) {
		return hotelDao.addHotel(map);
	}
	@Override
	public List<Map<String, Object>> selectAllHotel(Map<String, Object> map) {
		System.out.println("mapppp  : "+map);
		return hotelDao.selectAllHotel(map);
	}
	@Override
	public Map<String, Object> selectHotelDetails(Map<String, Object> map) {
		return hotelDao.selectHotelDetails(map);
	}
	@Override
	public int updateHotelDetails(Map<String, Object> map) {
		return hotelDao.updateHotelDetails(map);
	}
	
	
	@Override
	public int delBindByHR(Map<String, Object> map) {
		return hotelDao.delBindByHR(map);
	}
	@Override
	public int delHotelBedByHR(Map<String, Object> map) {
		return hotelDao.delHotelBedByHR(map);
	}
	@Override
	public int delHotelRoomByHR(Map<String, Object> map) {
		return hotelDao.delHotelRoomByHR(map);
	}
	@Override
	public List<Map<String, Object>> selectHotelBindRoom(Map<String, Object> map) {
		return hotelDao.selectHotelBindRoom(map);
	}
	@Override
	public int delHotel(Map<String, Object> map) {
		return hotelDao.delHotel(map);
	}
	
	@Override
	public List<Map<String, Object>> selectAllHotelByStatus(Map<String, Object> map) {
		return hotelDao.selectAllHotelByStatus(map);
	}
	
	@Override
	public List<Map<String, Object>> selectUserBindHotelDetails(Map<String, Object> map) {
		return hotelDao.selectUserBindHotelDetails(map);
	}
	@Override
	public List<Map<String, Object>> selectAllHotelBedByRoom(Map<String, Object> map) {
		return hotelDao.selectAllHotelBedByRoom(map);
	}
	@Override
	public int bindHotelRoomBed(Map<String, Object> map) {
		return hotelDao.bindHotelRoomBed(map);
	}
	@Override
	public int delBindByBed(Map<String, Object> map) {
		return hotelDao.delBindByBed(map);
	}
	
	@Override
	public int truncateBindHotelFair() {
		return hotelDao.truncateBindHotelFair();
	}
	
	
	@Override
	public List<Map<String, Object>> selectAllBindFairAndHotelFreeBed(Map<String, Object> map) {
		return hotelDao.selectAllBindFairAndHotelFreeBed(map);
	}
}

